package com.codi.bus.core.dao.impl;

import com.codi.base.dao.v2.GeneratedBaseDaoImpl;
import com.codi.bus.core.dao.PortfolioFundOrderDao;
import com.codi.bus.core.domain.PortfolioFundOrder;
import com.codi.bus.core.vo.query.PortfolioFundOrderQueryVo;
import com.github.pagehelper.PageRowBounds;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 模块名
 *
 * @author spy
 * @version 1.0 2017-11-07 13:28
 * @since 1.0
 */
@Slf4j
@Repository
public class PortfolioFundOrderDaoImpl extends GeneratedBaseDaoImpl<PortfolioFundOrder> implements PortfolioFundOrderDao {
    @Override
    public void add(PortfolioFundOrder record) {
        this.insert(generateStatement("insertSelective"), record);
    }

    @Override
    public PortfolioFundOrder getByApplyNo(String applyNo) {
        return this.getObject(generateStatement("getByApplyNo"), applyNo);
    }

    @Override
    public List<PortfolioFundOrder> query(PortfolioFundOrderQueryVo record) {
        return this.getSqlSession().selectList(generateStatement("query"), record);
    }
}
